//
//  JH_RGB_View.h
//  ColorSel
//
//  Created by 李江湖 on 2018/1/20.
//  Copyright © 2018年 李江湖. All rights reserved.
//

#import <UIKit/UIKit.h>
typedef NS_ENUM(NSUInteger, JHColorPickerStyle) {
    JHColorPickerStylePie,                     //圆形
    JHColorPickerStyleRect,                    //方形
    JHColorPickerStyleRing                     //环状
};

typedef void (^ PickFinishedBlock)(UIColor * __nullable);

@protocol JH_RGB_ViewDelegate <NSObject>

@optional
- (void)colorPickerDidSelectColor:(UIColor * __nullable)color;

@end
@interface JH_RGB_View : UIImageView
/*
 * 当拾色图片为圆环时，设置圆环内半径
 */
- (void)setPickerInnerRadius:(CGFloat)innerRadius;

/*
 * 设置拾色器外观，delegate和block二选一去实现，如果style为ZWColorPickerStyleRing，应当再设置setPickerInnerRadius:
 */
- (void)setPickerStyle:(JHColorPickerStyle)style andDelegate:(id<JH_RGB_ViewDelegate> __nonnull)delegate;

/*
 * 设置拾色器外观，delegate和block二选一去实现，如果style为ZWColorPickerStyleRing，应当再设置setPickerInnerRadius:
 */
- (void)setPickerStyle:(JHColorPickerStyle)style andBlock:(PickFinishedBlock __nonnull)block;
@end
